Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose URLPattern everywhere #236

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ptomato
Copy link

@ptomato ptomato commented Sep 13, 2024

I've drafted a set of criteria for which interfaces to expose universally on all globals, at
w3ctag/design-principles#510. URLPattern looks like it fits those criteria and is useful to have in any environment.

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno: …
    • kenchris/urlpattern-polyfill: N/A
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)

I've drafted a set of criteria for which interfaces to expose
universally on all globals, at
w3ctag/design-principles#510.
URLPattern looks like it fits those criteria and is useful to have in
any environment.
@jeremyroman
Copy link
Collaborator

Conceptually makes sense to me, but would like to see w3ctag/design-principles#510 settled.

Browsers (well, at the moment, Chromium) shipping this probably does imply a web-facing change albeit a minor one.

Does this confine the future evolution of URLPattern? For example, it says that anything that uses an event loop or I/O should not have [Exposed=*]. Would we be deciding, now, that no future members like that would be added (or, at least, that they would throw)? I don't anticipate anything like that, but want to be sure I understand all of the consequences.

@ptomato
Copy link
Author

ptomato commented Sep 20, 2024

Thanks! I will proceed with writing tests and filing implementation bugs when the design-principles issue is settled, then.

I don't believe this would prevent adding members in future that wouldn't be exposed everywhere. For example, AbortSignal has a timeout member that is only exposed in Window and Worker, despite AbortSignal having [Exposed=*]. And if there's a good reason and all else fails, well, the design principle is a guide, not a requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants